package il.ac.braude.ui.forms.questions;

import javax.swing.JCheckBox;

public class QCheckBox extends FormQuestion {

	private JCheckBox mCheckBox;

	public QCheckBox(String string) {
		mCheckBox = new JCheckBox(string);
		mCheckBox.setOpaque(false);
		add(mCheckBox);
	}

	@Override
	public void setDefaultAnswer(String defaultAnswer) {
		defaultAnswer.equals(Boolean.TRUE.toString());
	}

	@Override
	public String getAnswer() {
		return Boolean.toString(mCheckBox.isSelected());
	}

}
